home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / AIncludes / Balloons.a < prev    next >
Encoding:
Text File  |  1992-01-29  |  8.8 KB  |  268 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Balloons.a
  3. ;
  4. ;    Contains:    Assembly Equates for calling Balloon Help
  5. ;
  6. ;    Copyright:    © 1989-1991 by Apple Computer, Inc., all rights reserved.
  7. ;
  8. ;
  9.     IF &TYPE('__IncludingBalloons__') = 'UNDEFINED' THEN
  10. __IncludingBalloons__    SET    1
  11.  
  12.     IF &TYPE('__IncludingTraps__') = 'UNDEFINED' THEN
  13.     INCLUDE 'Traps.a'
  14.     ENDIF
  15.                         TITLE        'Balloons.a - Help Manager'
  16. ;
  17. ;___________________________________________________________________________________________________________
  18. ;
  19. hmBalloonHelpVersion    EQU     2            ;  The real version of the Help Manager 
  20. ;
  21. ;    Help Mgr Error Codes in range: -850 to -874
  22. ;
  23. hmHelpDisabled            EQU        -850        ; Show Balloons mode was off, call to routine ignored
  24. hmBalloonAborted        EQU        -853        ; Returned if mouse was moving or mouse wasn't in window port rect
  25. hmSameAsLastBalloon        EQU        -854        ; Returned from HMShowMenuBalloon if menu & item is same as last time
  26. hmHelpManagerNotInited    EQU        -855        ; Returned from HMGetHelpMenuHandle if help menu not setup 
  27. hmSkippedBalloon        EQU        -857        ; Returned from calls if helpmsg specified a skip balloon 
  28. hmWrongVersion            EQU        -858        ; Returned if help mgr resource was the wrong version 
  29. hmUnknownHelpType        EQU        -859        ; Returned if help msg record contained a bad type 
  30. hmOperationUnsupported    EQU        -861        ; Returned from HMShowBalloon call if bad method passed to routine 
  31. hmNoBalloonUp            EQU        -862        ; Returned from HMRemoveBalloon if no balloon was visible when call was made 
  32. hmCloseViewActive        EQU        -863        ; Returned from HMRemoveBalloon if CloseView was active
  33. ;
  34. kHMHelpMenuID            EQU        -16490        ; Resource ID and menu ID of help menu
  35. kHMAboutHelpItem        EQU        1            ; help menu item number of About Balloon Help…
  36. kHMShowBalloonsItem        EQU        3            ; help menu item number of Show/Hide Balloons
  37. ;
  38. kHMBalloonHelpID        EQU        -5696        ; ID of various Help Mgr package resources (in Pack14 range) 
  39. kHMBalloonWDEFID        EQU        126            ; Resource ID of the WDEF proc used in standard balloons 
  40. ;
  41. helpItem                EQU        1            ; key value in DITL template that corresponds to the help item
  42. ;
  43. ;    Options for Help Manager resources in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources
  44. ;
  45. hmDefaultOptions        EQU        0            ; default options for help manager resources
  46. hmUseSubID                EQU        1            ; treat resID's in resources as subID's of driver base ID (for Desk Accessories)
  47. hmAbsoluteCoords        EQU        2            ; ignore window port origin and treat rectangles as absolute coords (local to window) 
  48. hmSaveBitsNoWindow        EQU        4            ; don't create a window, just blast bits on screen. No update event is generated
  49. hmSaveBitsWindow        EQU        8            ; create a window, but restore bits behind window when window goes away & generate update event
  50. hmMatchInTitle            EQU        16            ; for hwin resources, match string anywhere in window title string
  51. ;
  52. ;    Constants for Help Types in 'hmnu', 'hdlg', 'hrct', 'hovr', & 'hfdr' resources
  53. ;
  54. kHMStringItem            EQU        1            ; pstring used in resource
  55. kHMPictItem                EQU        2            ; 'PICT' ResID used in resource
  56. kHMStringResItem        EQU        3            ; 'STR#' ResID & index used in resource
  57. kHMTEResItem            EQU        6            ; Styled Text Edit ResID used in resource ('TEXT' & 'styl')
  58. kHMSTRResItem            EQU        7            ; 'STR ' ResID used in resource
  59. kHMSkipItem                EQU        256            ; don't display a balloon
  60. kHMCompareItem            EQU        512            ; Compare pstring in menu item w/ PString in resource item ('hmnu' only)
  61. kHMNamedResourceItem    EQU        1024        ; Use pstring in menu item to get 'STR#', 'PICT', or 'STR ' resource ('hmnu' only)
  62. kHMTrackCntlItem         EQU        2048        ; Reserved
  63. ;
  64. ;    Constants for hmmHelpType's when filling out HMMessageRecord
  65. ;
  66. khmmString                EQU        1            ; help message contains a PString
  67. khmmPict                EQU        2            ; help message contains a resource ID to a 'PICT' resource
  68. khmmStringRes            EQU        3            ; help message contains a res ID & index to a 'STR#' resource
  69. khmmTEHandle            EQU        4            ; help message contains a Text Edit handle
  70. khmmPictHandle            EQU        5            ; help message contains a Picture handle
  71. khmmTERes                EQU        6            ; help message contains a res ID to 'TEXT' & 'styl' resources
  72. khmmSTRRes                EQU        7            ; help message contains a res ID to a 'STR ' resource
  73. ;
  74. ;    ResTypes for Styled TE Handles when extracting from Resources
  75. ;
  76. kHMTETextResType        EQU        'TEXT'        ; Resource Type of text data for styled TE record w/o style info
  77. kHMTEStyleResType        EQU        'styl'        ; Resource Type of style information for styled TE record
  78.  
  79. ;    Generic defines for the state parameter used when extracting 'hmnu' & 'hdlg' messages
  80. ;
  81. kHMEnabledItem            EQU        0            ; item is enabled, but not checked or control value EQU 0
  82. kHMDisabledItem            EQU        1            ; item is disabled, grayed in menus or disabled in dialogs
  83. kHMCheckedItem            EQU        2            ; item is enabled, and checked or control value EQU 1
  84. kHMOtherItem            EQU        3            ; item is enabled, and control value > 1
  85. ;
  86. ;    Resource Types for whichType parameter used when extracting 'hmnu' & 'hdlg' messages
  87. ;
  88. kHMMenuResType            EQU        'hmnu'        ; ResType of help resource for supporting menus
  89. kHMDialogResType        EQU        'hdlg'        ; ResType of help resource for supporting dialogs
  90. kHMWindListResType        EQU        'hwin'        ; ResType of help resource for supporting windows
  91. kHMRectListResType        EQU        'hrct'        ; ResType of help resource for rectangles in windows
  92. kHMOverrideResType        EQU        'hovr'        ; ResType of help resource for overriding system balloons
  93. kHMFinderApplResType    EQU        'hfdr'        ; ResType of help resource for custom balloon in Finder
  94. ;
  95. ;    Method parameters to pass to HMShowBalloon    
  96. ;
  97. kHMRegularWindow        EQU        0            ; Create a regular window floating above all windows    
  98. kHMSaveBitsNoWindow        EQU        1            ; Just save the bits and draw (for MDEF calls
  99. kHMSaveBitsWindow        EQU        2            ; Regular window, save bits behind, AND generate update event
  100. ;
  101. ;    help message structure (offsets into help message record)
  102. ;
  103. hmmHelpType                EQU     0
  104. hmmHelpMessage            EQU        2
  105. hmmHMSize                EQU        4 + 256        ; HMMessageRecord worse case size
  106. ;
  107. ;    help message size
  108. ;
  109. khmmMsgSize                EQU        256 + 2        ; max pstring + type integer
  110. ;
  111. ;
  112. ;___________________________________________________________________________________________________________
  113. ;
  114. ;    Package selectors for Help Manager Package
  115. ;
  116. kHMGetHelpMenuHandle    EQU        $0200            ; 2 words of parameters
  117. kHMShowBalloon            EQU        $0B01            ; 11 words of parameters
  118. kHMRemoveBalloon        EQU        $0002            ; 0 words of parameters
  119. kHMGetBalloons            EQU        $0003            ; 0 words of params    (Note: doesn't load package!)
  120. kHMSetBalloons            EQU        $0104            ; 1 word of parameters
  121. kHMShowMenuBalloon        EQU        $0E05            ; 14 words of parameters
  122. kHMGetIndHelpMsg        EQU        $1306            ; 19 words of parameters    <12>
  123. kHMIsBalloon            EQU        $0007            ; 0 words of parameters
  124. kHMSetFont                EQU        $0108            ; 1 word of parameters
  125. kHMSetFontSize            EQU        $0109            ; 1 word of parameters
  126. kHMGetFont                EQU        $020A            ; 2 words of parameters
  127. kHMGetFontSize            EQU        $020B            ; 2 words of parameters
  128. kHMSetDialogResID        EQU        $010C            ; 1 words of parameters
  129. kHMSetMenuResID            EQU        $020D            ; 2 words of parameters
  130. kHMBalloonRect            EQU        $040E            ; 4 words of parameters
  131. kHMBalloonPict            EQU        $040F            ; 4 words of parameters
  132. kHMScanTemplateItems    EQU        $0410            ; 4 words of parameters
  133. kHMExtractHelpMsg        EQU        $0711            ; 7 words of parameters
  134. kHMFillCitationString    EQU        $0512            ; 5 words of parameters
  135. kHMGetDialogResID        EQU        $0213            ; 2 words of parameters
  136. kHMGetMenuResID            EQU        $0314            ; 3 words of parameters
  137. kHMGetBalloonWindow        EQU        $0215            ; 2 words of parameters
  138. ;
  139. ;___________________________________________________________________________________________________________
  140. ;
  141. ;    Help Manager interface macros
  142. ;
  143.         macro
  144.             _HMGetHelpMenuHandle
  145.             MOVE.W    #kHMGetHelpMenuHandle,D0
  146.             _Pack14    
  147.         endm
  148.         
  149.         macro
  150.             _HMShowBalloon
  151.             MOVE.W    #kHMShowBalloon,D0
  152.             _Pack14    
  153.         endm
  154.  
  155.         macro
  156.             _HMRemoveBalloon
  157.             MOVE.W    #kHMRemoveBalloon,D0
  158.             _Pack14    
  159.         endm
  160.         
  161.         macro
  162.             _HMGetBalloons
  163.             MOVE.W    #kHMGetBalloons,D0
  164.             _Pack14    
  165.         endm
  166.  
  167.         macro
  168.             _HMSetBalloons
  169.             MOVE.W    #kHMSetBalloons,D0
  170.             _Pack14    
  171.         endm
  172.         
  173.         macro
  174.             _HMShowMenuBalloon
  175.             MOVE.W    #kHMShowMenuBalloon,D0
  176.             _Pack14    
  177.         endm
  178.  
  179.         macro
  180.             _HMGetIndHelpMsg
  181.             MOVE.W    #kHMGetIndHelpMsg,D0
  182.             _Pack14    
  183.         endm    
  184.         
  185.         macro
  186.             _HMIsBalloon
  187.             MOVE.W    #kHMIsBalloon,D0
  188.             _Pack14    
  189.         endm
  190.  
  191.         macro
  192.             _HMSetFont
  193.             MOVE.W    #kHMSetFont,D0
  194.             _Pack14    
  195.         endm
  196.         
  197.         macro
  198.             _HMGetFont
  199.             MOVE.W    #kHMGetFont,D0
  200.             _Pack14    
  201.         endm
  202.         macro
  203.             _HMGetFontSize
  204.             MOVE.W    #kHMGetFontSize,D0
  205.             _Pack14    
  206.         endm
  207.         
  208.         macro
  209.             _HMSetDialogResID
  210.             MOVE.W    #kHMSetDialogResID,D0
  211.             _Pack14    
  212.         endm
  213.  
  214.         macro
  215.             _HMSetMenuResID
  216.             MOVE.W    #kHMSetMenuResID,D0
  217.             _Pack14    
  218.         endm
  219.         
  220.         macro
  221.             _HMBalloonRect
  222.             MOVE.W    #kHMBalloonRect,D0
  223.             _Pack14    
  224.         endm
  225.         
  226.         macro
  227.             _HMBalloonPict
  228.             MOVE.W    #kHMBalloonPict,D0
  229.             _Pack14    
  230.         endm
  231.         
  232.         macro
  233.             _HMScanTemplateItems
  234.             MOVE.W    #kHMScanTemplateItems,D0
  235.             _Pack14    
  236.         endm
  237.         
  238.         macro
  239.             _HMExtractHelpMsg
  240.             MOVE.W    #kHMExtractHelpMsg,D0
  241.             _Pack14    
  242.         endm
  243.         
  244.         macro
  245.             _HMFillCitationString
  246.             MOVE.W    #kHMFillCitationString,D0
  247.             _Pack14    
  248.         endm
  249.         
  250.         macro
  251.             _HMGetDialogResID
  252.             MOVE.W    #kHMGetDialogResID,D0
  253.             _Pack14    
  254.         endm
  255.  
  256.         macro
  257.             _HMGetMenuResID
  258.             MOVE.W    #kHMGetMenuResID,D0
  259.             _Pack14    
  260.         endm
  261.         
  262.         macro
  263.             _HMGetBalloonWindow
  264.             MOVE.W    #kHMGetBalloonWindow,D0
  265.             _Pack14    
  266.         endm
  267.  
  268.     ENDIF    ; ...already included